package com.HQCourse.client.course;

import com.example.HQCourse.model.vod.Course;
import com.example.HQCourse.model.vod.Teacher;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value="HQCourceServiceVod")
public interface CourseClient {
    @ApiOperation("根据关键字查询课程")
    @GetMapping("/api/vod/course/inner/findByKeyword/{keyword}")
    List<Course> findByKeyword(@PathVariable("keyword") String keyword);
    @ApiOperation("根据ID查询课程")
    @GetMapping("/api/vod/course/inner/getById/{courseId}")
    Course getById(@PathVariable("courseId") Long courseId);
    @ApiOperation("根据id查询讲师信息")
    @GetMapping("admin/vod/teacher/getTeacherId/{id}")
    public Teacher getTeacherId(@PathVariable("id") Long id);

}
